using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class unity_demo : MonoBehaviour
{
    private void Start()
    {
        Element[] elements = { new(3.14f), new((short)-8), new((byte)8), new((ushort)3000) };
        var buffer = Hluart.GetBuffer(elements);
        string buffer_str = "";
        foreach (byte b in buffer)
        {
            buffer_str += string.Format("{0:x}",b) + " ";
        }
        Debug.Log(buffer_str);
        var res_elements = Hluart.GetElements(buffer);
        foreach (var e in res_elements)
        {
            Debug.Log(e.val);
        }
    }
    private void Update()
    {
        
    }

}
